import React, { Component } from 'react';
import { StyleSheet, View, Text, PixelRatio } from 'react-native';
import { GLOBAL } from '../../../../config/global';
import { orderStyle, commonStyle } from '../_common/style';
const scale = GLOBAL.SCALE;
export class MBodyCpt extends Component {
	constructor(props) {
		super(props);
		this.state = {

		}
	}

	render () {
		let { data } = this.props || {};
		return (
			<View >
				{
					data && data.map((item, index) => {
						return (
							<View style={index < data.length - 1 ? styles.modalXian : null} key={index}>
								{item && item.map((items, indexs) => {
									return (
										<View key={indexs} style={[commonStyle.row3, styles.lie]}>
											<Text style={orderStyle.lable}>{items.title}</Text>
											<Text style={[orderStyle.value, { width: 200 * scale }]}>{items.value || '-'}</Text>
										</View>
									)
								})}
							</View>
						)
					})
				}
			</View>
		)
	}
}
const styles = StyleSheet.create({
	modalFex: {
		flexWrap: 'wrap',
		display: 'flex',
		flexDirection: 'row',
		width: 200 * scale
	},
	lie: {
		paddingBottom: 10 * scale
	},
	modalXian: {
		borderBottomWidth: 1 / PixelRatio.get(),
		borderStyle: 'solid',
		borderBottomColor: '#ccc',
		marginBottom: 15 * scale
	}
})